Skip to content

feat(extensions): inject resolved sidebar keybindings - #615

Merged
benvinegar merged 1 commit into
mainfrom
feat/remappable-sidebar-keybindings
Jul 28, 2026
Merged

feat(extensions): inject resolved sidebar keybindings#615
benvinegar merged 1 commit into
mainfrom
feat/remappable-sidebar-keybindings

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

  • Inject a resolved keybindings manager into custom extension sidebar props.
  • Keep component-local matching aligned with user remaps, unbindings, and rejected extension key conflicts.
  • Document the API and add extension-facing coverage.

Validation

  • bun run typecheck
  • bun test src/ui/lib/keymap.test.ts src/ui/AppHost.extension-sidebar.test.tsx
  • bun run format:check && bun run lint && bun run check:docs
  • bun run check:pack
  • bun test (fails outside this change: PTY atomic-save watch refresh timeout and missing website @axe-core/playwright dependency)

This PR description was generated by Pi using gpt-5.6-terra

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hunk-web Ready Ready Preview Jul 28, 2026 2:28pm

Request Review

@benvinegar
benvinegar marked this pull request as ready for review July 28, 2026 14:28
@benvinegar
benvinegar force-pushed the feat/remappable-sidebar-keybindings branch from a10cfb7 to 5317532 Compare July 28, 2026 14:28
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds resolved command keybindings to extension sidebar props.

  • Introduces a read-only sidebar keybindings API for matching command IDs and retrieving effective chords.
  • Derives sidebar bindings from built-in and extension command resolution, including remaps, unbindings, and rejected conflicts.
  • Documents the extension-facing API and adds unit, pane, and application-host coverage.

Confidence Score: 5/5

The PR appears safe to merge, with resolved sidebar bindings consistently matching the application’s effective command dispatch behavior.

The sidebar manager uses the same chord parser and matcher as command dispatch, updates when resolved configuration changes, and receives conflict-filtered extension keys covered by focused integration tests.

Important Files Changed

Filename Overview
src/ui/lib/keymap.ts Adds an immutable command-key manager using the same parsing and matching primitives as application dispatch.
src/ui/App.tsx Builds the sidebar manager from resolved built-in keys and conflict-filtered extension command keys, then injects it into sidebar panes.
src/ui/components/panes/ExtensionSidebarPane.tsx Threads the resolved keybindings manager into extension sidebar view props.
src/extension-api/types.ts Defines and exposes the structural, read-only sidebar keybindings contract.
src/ui/AppHost.extension-sidebar.test.tsx Verifies that user remaps and rejected extension conflicts are reflected in an extension sidebar.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["Default and user keybindings"] --> B["resolveCommandKeys"]
  B --> C["Resolved built-in command keys"]
  C --> D["buildExtensionAppCommands"]
  D --> E["Conflict-filtered extension keys"]
  C --> F["createExtensionSidebarKeybindings"]
  E --> F
  F --> G["ExtensionSidebarViewProps.keybindings"]
  G --> H["Extension sidebar component"]
Loading

Reviews (1): Last reviewed commit: "feat(extensions): inject resolved sideba..." | Re-trigger Greptile

@benvinegar
benvinegar enabled auto-merge (squash) July 28, 2026 14:31
@benvinegar
benvinegar merged commit 1501eb6 into main Jul 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant